const { Switch } = require("../lib/types");

module.exports = {
    name: "ngx_http_proxy_module",
    map: {
        proxy_bind: [[Switch, String], , ["http", "server", "location"]],
        proxy_buffer_size: [String, "4k|8k", ["http", "server", "location"]],
        proxy_buffering: [Switch, true, ["http", "server", "location"]],
        proxy_buffers: [String, "8 4k|8k", ["http", "server", "location"]],
        proxy_busy_buffers_size: [String, "8k|16k", ["http", "server", "location"]],
        proxy_cache: [[Switch, String], false, ["http", "server", "location"]],
        proxy_cache_background_update: [Switch, false, ["http", "server", "location"]],
        proxy_cache_bypass: [String, , ["http", "server", "location"]],
        proxy_cache_convert_head: [Switch, true, ["http", "server", "location"]],
        proxy_cache_key: [String, "$scheme$proxy_host$request_uri", ["http", "server", "location"]],
        proxy_cache_lock: [Switch, false, ["http", "server", "location"]],
        proxy_cache_lock_age: [String, "5s", ["http", "server", "location"]],
        proxy_cache_lock_timeout: [String, "5s", ["http", "server", "location"]],
        proxy_cache_max_range_offset: [String, , ["http", "server", "location"]],
        proxy_cache_methods: [String, "GET HEAD", ["http", "server", "location"]],
        proxy_cache_min_uses: [Number, 1, ["http", "server", "location"]],
        proxy_cache_path: [String, , "http"],
        proxy_cache_purge: [String, , ["http", "server", "location"]],
        proxy_cache_revalidate: [Switch, false, ["http", "server", "location"]],
        proxy_cache_use_stale: [[Switch, String], false, ["http", "server", "location"]],
        proxy_cache_valid: [String, , ["http", "server", "location"]],
        proxy_connect_timeout: [String, "60s", ["http", "server", "location"]],
        proxy_cookie_domain: [[Switch, String], false, ["http", "server", "location"]],
        proxy_cookie_flags: [[Switch, String], false, ["http", "server", "location"]],
        proxy_cookie_path: [[Switch, String], false, ["http", "server", "location"]],
        proxy_force_ranges: [Switch, false, ["http", "server", "location"]],
        proxy_headers_hash_bucket_size: [String, "64", ["http", "server", "location"]],
        proxy_headers_hash_max_size: [String, "512", ["http", "server", "location"]],
        proxy_hide_header: [String, , ["http", "server", "location"]],
        proxy_http_version: [String, "1.0", ["http", "server", "location"]],
        proxy_ignore_client_abort: [Switch, false, ["http", "server", "location"]],
        proxy_ignore_headers: [String, , ["http", "server", "location"]],
        proxy_intercept_errors: [Switch, false, ["http", "server", "location"]],
        proxy_limit_rate: [String, "0", ["http", "server", "location"]],
        proxy_max_temp_file_size: [String, "1024m", ["http", "server", "location"]],
        proxy_method: [String, , ["http", "server", "location"]],
        proxy_next_upstream: [String, "error timeout", ["http", "server", "location"]],
        proxy_next_upstream_timeout: [String, "0", ["http", "server", "location"]],
        proxy_next_upstream_tries: [Number, 0, ["http", "server", "location"]],
        proxy_no_cache: [String, , ["http", "server", "location"]],
        proxy_pass: [String, , ["location"]],
        proxy_pass_header: [String, , ["http", "server", "location"]],
        proxy_pass_request_body: [Switch, true, ["http", "server", "location"]],
        proxy_pass_request_headers: [Switch, true, ["http", "server", "location"]],
        proxy_read_timeout: [String, "60s", ["http", "server", "location"]],
        proxy_redirect: [[Switch, String], "default", ["http", "server", "location"]],
        proxy_request_buffering: [Switch, true, ["http", "server", "location"]],
        proxy_send_lowat: [String, "0", ["http", "server", "location"]],
        proxy_send_timeout: [String, "60s", ["http", "server", "location"]],
        proxy_set_body: [String, , ["http", "server", "location"]],
        proxy_set_header: [String, ["Host $proxy_host", "Connection close"], ["http", "server", "location"]],
        proxy_socket_keepalive: [Switch, false, ["http", "server", "location"]],
        proxy_ssl_certificate: [String, , ["http", "server", "location"]],
        proxy_ssl_certificate_key: [String, , ["http", "server", "location"]],
        proxy_ssl_ciphers: [String, "default", ["http", "server", "location"]],
        proxy_ssl_conf_command: [String, , ["http", "server", "location"]],
        proxy_ssl_crl: [String, , ["http", "server", "location"]],
        proxy_ssl_name: [String, "$proxy_host", ["http", "server", "location"]],
        proxy_ssl_password_file: [String, , ["http", "server", "location"]],
        proxy_ssl_protocols: [String, "TLSv1 TLSv1.1 TLSv1.2", ["http", "server", "location"]],
        proxy_ssl_server_name: [Switch, false, ["http", "server", "location"]],
        proxy_ssl_session_reuse: [Switch, true, ["http", "server", "location"]],
        proxy_ssl_trusted_certificate: [String, , ["http", "server", "location"]],
        proxy_ssl_verify: [Switch, false, ["http", "server", "location"]],
        proxy_ssl_verify_depth: [Number, 1, ["http", "server", "location"]],
        proxy_store: [[Switch, String], false, ["http", "server", "location"]],
        proxy_store_access: [String, "user:rw", ["http", "server", "location"]],
        proxy_temp_file_write_size: [String, "8k|16k", ["http", "server", "location"]],
        proxy_temp_path: [String, "proxy_temp", ["http", "server", "location"]]
    }
}